//
//  BN_DiscListViewController.m
//  BabyNow
//
//  Created by 刘泽琛 on 14-6-11.
//  Copyright (c) 2014年 iMobile. All rights reserved.
//

#import "BN_DiscListViewController.h"

@interface BN_DiscListViewController ()

@end

@implementation BN_DiscListViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    self.tabBarController.tabBar.hidden = YES;
    self.navigationController.navigationBarHidden = NO;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    UIBarButtonItem *leftItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"houtui"] style:UIBarButtonItemStylePlain target:self action:@selector(backRootVC)];
    self.navigationItem.leftBarButtonItem = leftItem;
    self.view.backgroundColor = APP_DEVELOP_IMG_BACKGROUND;
    [self joiningTogetherUI];
}

- (void)joiningTogetherUI {
    if ([_flg isEqualToString:@"message"]) {
        self.title = @"消息";
        _warningImageView.image = [UIImage imageNamed:@"no_message"];
    }else {
        self.title = @"积分";
        _warningImageView.image = [UIImage imageNamed:@"integral"];
    }
    
    switch (MAIN_VERSION) {
        case 6:
            _warningImageView.frame = CGRectMake((SCREEN_WIDTH-CGRectGetWidth(_warningImageView.frame))/2, ((FULLSCREEN_HEIGHT-44)-CGRectGetHeight(_warningImageView.frame))/2, CGRectGetWidth(_warningImageView.frame), CGRectGetHeight(_warningImageView.frame));
            break;
        default:
            
            _warningImageView.frame = CGRectMake((SCREEN_WIDTH-CGRectGetWidth(_warningImageView.frame))/2, (FULLSCREEN_HEIGHT-CGRectGetHeight(_warningImageView.frame))/2, CGRectGetWidth(_warningImageView.frame), CGRectGetHeight(_warningImageView.frame));
            break;
    }
}

#pragma mark
#pragma mark Action
- (void)backRootVC {
    [self.navigationController popViewControllerAnimated:YES];
}

@end
